1. Field of the Invention
The present invention relates to the manipulation of objects displayed on a display screen, and more particularly to a method and apparatus for positioning objects using direct manipulation.
2. Background Art
FIG. 1 shows an example of two objects, object A 100 and object B 105, displayed on a display device such as a computer display screen. The objects may, for example, be objects created with a graphics editing program. Objects such as object A 100 and object B 105 that are displayed on a display screen may be referred to as xe2x80x9cscreen objects.xe2x80x9d The screen objects shown in FIG. 1 are simple rectangles. However, screen objects can have any size and shape. Further, a screen object may consist of a group of different objects. For example, a screen object may comprise a bit-mapped image combined with a vector-based drawing object. A screen object may also represent other objects or data, such as, for example, a sound clip or video data.
A user often desires to manipulate screen objects such that they are precisely located or precisely dimensioned with respect to other objects on the screen. For example, a user may desire to position an object such that one or more of its edges coincide with one or more edges of another object, as shown in FIG. 2, or such that one or more of its edges are positioned close to but spaced apart from another object, as shown in FIG. 3. A user may also wish to resize an object such that the object has the same height and/or width as another object, as shown in FIG. 4.
A number of approaches to the precision location and precision sizing of screen objects have been developed in the prior art.
One approach, used in drawing programs such as MacDraw ((trademark)) and Claris Works ((trademark)), is to provide precision-location and precision-sizing commands. To use these commands, a user must first select the objects in question, for example by positioning a cursor over each object and clicking a mouse button. Next, the user must invoke the desired command, for example by hitting an appropriate hot key or key combination on a keyboard or by selecting the command using pull-down menus. Finally, the user must enter information regarding the manner in which the user wants to position or resize the object into a dialog box that opens after the command is activated. FIG. 5 shows an example dialog box for the xe2x80x9calignxe2x80x9d menu command from MacDraw((trademark)).
Although using precision location and precision sizing commands allows the user to position or size objects, the multiple steps required to use these commands are inconvenient.
A second approach uses a technique sometimes referred to as xe2x80x9cgravity.xe2x80x9d In this approach an object, around its edges, is provided with a xe2x80x9cregion of influencexe2x80x9d that exerts a pull on other objects that come into the region. FIGS. 6-9 illustrate the operation of the prior art gravity technique. In FIG. 6, a dotted rectangle 600 indicates the region of influence for the left edge of object B 105. FIG. 6 also shows a mouse cursor 605 positioned over object A 100. A user may move object A 100 by selecting and xe2x80x9cdraggingxe2x80x9d object A 100 with a mouse.
In the gravity approach, when a first object (such as object A 100) is dragged so that one of its edges enters the region of influence of an edge of a second object (such as object B 105), the first object is automatically xe2x80x9csnappedxe2x80x9d to the second object such that the edges of the two objects meet. FIG. 7 shows object A 100 after it has been moved horizontally to the right such that its right edge enters region of influence 600 of object B 105. Once the right edge of object A 100 enters region of influence 600, object A 100 is snapped to the right such that its right edge is aligned with the left edge of object B 105, as shown in FIG. 8. In this prior art example, if mouse cursor 605 is dragged far enough further to the right, object A 100 once again becomes xe2x80x9cunstuckxe2x80x9d from object B 105, as shown in FIG. 9.
Although the gravity technique of the prior art is useful when a user wants to align objects such that their edges coincide, it prevents the user from arbitrarily positioning objects close to one another. As soon as an edge of a first object enters a second object""s region of influence, the first object is snapped into alignment with the second object. Prior art gravity systems thus provide for easy aligrunent, but at the cost of preventing arbitrary positioning of objects close to one another.
The present invention comprises a method and apparatus for manipulating screen objects utilizing multiband regions of influence. Positioning a reference datum of an object within a particular band invokes a particular functionality or operation related to that band and to that datum.
In one embodiment, three types of functionality are provided. Moving a reference point or datum (for example, a line representing an edge or a user-defined reference point) of an object A into a first band of an object B places object A under the influence of object B""s gravity, causing object A to be pulled into precise alignment with object B. Moving the reference point of object A from the first band into a second band turns off object B""s gravity, allowing object A to be freely moved to any arbitrary position near the object B. Moving the reference point of the object A to a position outside all bands causes object B""s gravity function to be turned back on. By providing multiple bands of functionality, this embodiment allows a user to conveniently select among precise positioning (or sizing) provided by gravity and arbitrary positioning (or sizing) allowed by an absence of gravity, simply by dragging an object""s reference point into an appropriate band. No menu commands are required.
In other embodiments, the bands of the invention provide other kinds of functionalities or operations. For example, one embodiment comprises bands that provide different types of precise positioning. In one embodiment, multiple bands are provided, each one causing objects to be positioned so as to be spaced apart by one of several precise, predetermined distances.